﻿@{
    ViewBag.Title = "EditPiece";
    Layout = "~/Views/Shared/_CreateLayout.cshtml";
}
@model SelfInfo.Models.PIECE
<h2>Edit PIECE</h2>

@using (Html.BeginForm("Edit", "Piece", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
{
    @Html.ValidationSummary(true)

     <fieldset>
        <legend>PIECE</legend>

        <div class='form-group'>
        <div  class="col-sm-2 control-label">
            @Html.LabelFor(model => model.TYPE)
        </div>
        <div class="col-sm-4">
           @* @Html.EditorFor(model => model.TYPE)*@

           
            @Html.DropDownList("TYPE", null, new { @class = "form-control" })   @* 第二个参数如果用selectlist的话没有默认值*@
            @Html.ValidationMessageFor(model => model.TYPE)
        </div>
        </div>

        <div class='form-group'>
        <div  class="col-sm-2 control-label">
            @Html.LabelFor(model => model.NAME)
        </div>
        <div class="col-sm-4">
            @Html.TextBoxFor(x => x.NAME, new { @class = "form-control" })
            @Html.ValidationMessageFor(model => model.NAME)
        </div>
        </div>

        <div class='form-group'>
        <div  class="col-sm-2 control-label">
            @Html.LabelFor(model => model.STARTDATE)
        </div>
        <div class="col-sm-4">
           @Html.EditorFor(model => model.STARTDATE, "DataPicker")
        </div>
        </div>

        <div class='form-group'>
        <div  class="col-sm-2 control-label">
            @Html.LabelFor(model => model.ENDDATE)
        </div>
        <div class="col-sm-4">
            @Html.EditorFor(model => model.ENDDATE, "DataPicker")
        </div>
        </div>

        <div class='form-group'>
        <div  class="col-sm-2 control-label">
            @Html.LabelFor(model => model.BRIEF)
        </div>
        <div class="col-sm-4">
            @Html.TextBoxFor(x => x.BRIEF, new { @class = "form-control" })
        </div>
        </div>

        <div class='form-group'>
        <div  class="col-sm-2 control-label">
            @Html.LabelFor(model => model.COMMENT)
        </div>
        <div class="col-sm-4">
            @Html.TextBoxFor(x => x.COMMENT, new { @class = "form-control" })
        </div>
        </div>

        <div class='form-group'>
        <div  class="col-sm-2 control-label">
            @Html.LabelFor(model => model.SCORE)
        </div>
        <div class="col-sm-4">
            @Html.TextBoxFor(x => x.SCORE, new { @class = "form-control" })
        </div>
        </div>

        <div class='form-group'>
        <div  class="col-sm-2 control-label">
            @Html.LabelFor(model => model.RESULT)
        </div>
        <div class="col-sm-4">
            @Html.TextBoxFor(x => x.RESULT, new { @class = "form-control" })
        </div>
        </div>

        <div class='form-group'>
        <div  class="col-sm-2 control-label">
            @Html.LabelFor(model => model.ISSHOW)
        </div>
        <div class="col-sm-4">
            @Html.CheckBoxFor(x => x.ISSHOW, new { @class = "form-control" })
        </div>
        </div>

        <div class='form-group'>
        <div  class="col-sm-6 ">
            <button type="submit" class="btn btn-primary pull-right">Create</button>
        </div>
        </div>
    </fieldset>
}
